import java.io.Serializable;
import java.util.HashSet;

public class Compte implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 
	 */
	private int numero;
	private String type;
	private float solde;
	private int decouvertAutorise;
	
	private HashSet<Depot> _depot;

	private HashSet<Retrait> _retrait;

	public Compte(int n, String t, float s, int d) {
		this.setNumero(n);
		this.setType(t);
		this.setSolde(s);
		this.setDecouvertAutorise(d);
		this.setDepots(new HashSet<Depot>());
		this.setRetraits(new HashSet<Retrait>());
	}
	public void setDepots(HashSet<Depot> m){
		_depot = m;
	}
	public HashSet<Depot> getDepots(){
		return _depot;
	}
	
	public void setDepot(Depot m){
		getDepots().add(m);
	}
	
	public void setRetraits(HashSet<Retrait> m){
		_retrait = m;
	}
	public HashSet<Retrait> getRetraits(){
		return _retrait;
	}
	
	public void setRetrait(Retrait m){
		getRetraits().add(m);
	}
	
	public void setNumero(int n)
	{numero = n;}
	
	public void setType(String t)
	{type = t;}
	
	public void setSolde(float s)
	{solde = s;}
	
	public void setDecouvertAutorise(int d)
	{decouvertAutorise = d;}
	

	public int getNumero() {
		return numero;
	}

	public String getType() {
		return type;
	}

	public Float getSolde() {
		return solde;
	}
	
	public int getDecouvertAutorise() {
		return decouvertAutorise;
	}
	

}
